package com.qiaoba.mq.controller;

import com.qiaoba.mq.bussnis.OrderSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 乔巴
 * @date 2021/3/23 11:53
 **/
@RestController
public class OrderController {

    @Autowired
    OrderSender orderSender;

    @RequestMapping("send")
    public void send() throws InterruptedException {
        orderSender.sendMessage(123L,2000L);
        while (true){
            Thread.sleep(1000*100);
        }
    }

}
